package com.ruoyi.web.controller.workflow;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.workflow.domain.CarPackageAudit;
import com.ruoyi.workflow.service.ITodoTaskService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 我的待办 Controller
 *
 * @author shier
 * @date 2022-11-17
 */
@RestController
@RequestMapping("/workflow/todo")
public class TaskTodoController extends BaseController {

    private final ITodoTaskService todoTaskService;
    public TaskTodoController(ITodoTaskService todoTaskService) {
        this.todoTaskService = todoTaskService;
    }

    /**
     *  查询我的待办任务列表
     */
    @PreAuthorize("@ss.hasPermi('workflow:todo:list')")
    @GetMapping("/list")
    public TableDataInfo list(CarPackageAudit carPackageAudit) {
        return todoTaskService.selectTodoList(carPackageAudit);
    }
}
